Optimal. Leaf size=55 \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \cot ^2(x)}}{\sqrt{a-b}}\right )}{(a-b)^{3/2}}-\frac{1}{(a-b) \sqrt{a+b \cot ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0750258, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3670, 444, 51, 63, 208} \[ \frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \cot ^2(x)}}{\sqrt{a-b}}\right )}{(a-b)^{3/2}}-\frac{1}{(a-b) \sqrt{a+b \cot ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 444
Rule 51
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{\cot (x)}{\left (a+b \cot ^2(x)\right )^{3/2}} \, dx &=-\operatorname{Subst}\left (\int \frac{x}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\cot (x)\right )\\ &=-\left (\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{(1+x) (a+b x)^{3/2}} \, dx,x,\cot ^2(x)\right )\right )\\ &=-\frac{1}{(a-b) \sqrt{a+b \cot ^2(x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{(1+x) \sqrt{a+b x}} \, dx,x,\cot ^2(x)\right )}{2 (a-b)}\\ &=-\frac{1}{(a-b) \sqrt{a+b \cot ^2(x)}}-\frac{\operatorname{Subst}\left (\int \frac{1}{1-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b \cot ^2(x)}\right )}{(a-b) b}\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{a+b \cot ^2(x)}}{\sqrt{a-b}}\right )}{(a-b)^{3/2}}-\frac{1}{(a-b) \sqrt{a+b \cot ^2(x)}}\\ \end{align*}
Mathematica [C] time = 0.0411101, size = 44, normalized size = 0.8 \[ \frac{\text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \cot ^2(x)}{a-b}\right )}{(b-a) \sqrt{a+b \cot ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.016, size = 56, normalized size = 1. \begin{align*} -{\frac{1}{a-b}\arctan \left ({\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}{\frac{1}{\sqrt{-a+b}}}} \right ){\frac{1}{\sqrt{-a+b}}}}-{\frac{1}{a-b}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.11315, size = 774, normalized size = 14.07 \begin{align*} \left [\frac{{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a - b\right )} \sqrt{a - b} \log \left (\sqrt{a - b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}}{\left (\cos \left (2 \, x\right ) - 1\right )} -{\left (a - b\right )} \cos \left (2 \, x\right ) + a\right ) + 2 \,{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a + b\right )} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}}}{2 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (2 \, x\right )\right )}}, -\frac{{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a - b\right )} \sqrt{-a + b} \arctan \left (-\frac{\sqrt{-a + b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}}}{a - b}\right ) -{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a + b\right )} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}}}{a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (2 \, x\right )}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 15.2512, size = 48, normalized size = 0.87 \begin{align*} - \frac{1}{\left (a - b\right ) \sqrt{a + b \cot ^{2}{\left (x \right )}}} - \frac{\operatorname{atan}{\left (\frac{\sqrt{a + b \cot ^{2}{\left (x \right )}}}{\sqrt{- a + b}} \right )}}{\sqrt{- a + b} \left (a - b\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.28151, size = 165, normalized size = 3. \begin{align*} \frac{\sqrt{a - b} \log \left ({\left | b \right |}\right ) \mathrm{sgn}\left (\sin \left (x\right )\right )}{2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )}} - \frac{\sqrt{a - b} \log \left ({\left | -\sqrt{a - b} \sin \left (x\right ) + \sqrt{a \sin \left (x\right )^{2} - b \sin \left (x\right )^{2} + b} \right |}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \mathrm{sgn}\left (\sin \left (x\right )\right )} - \frac{\sin \left (x\right )}{\sqrt{a \sin \left (x\right )^{2} - b \sin \left (x\right )^{2} + b}{\left (a \mathrm{sgn}\left (\sin \left (x\right )\right ) - b \mathrm{sgn}\left (\sin \left (x\right )\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]